#ifndef HISMANA_H
#define HISMANA_H

#include <QWidget>
#include<QStandardItemModel>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlError>
#include <QSqlTableModel>
namespace Ui {
class HisMana;
}

class HisMana : public QWidget
{
    Q_OBJECT

public:
    enum Mode {
        bNameMode = 0,
        cNameMode = 1,
        bNoMode = 2
    };
    explicit HisMana(QSqlDatabase &d);
    ~HisMana();
private slots:
    void on_rueBut_clicked();

    void on_findBut_clicked();

    void on_comboBox_currentTextChanged(const QString &arg1);

private:
    Ui::HisMana *ui;
    QSqlDatabase db;
    Mode nowMode;
    QStandardItemModel m_model;
    void getAll();
    QSqlTableModel * d_model;
};

#endif // HISMANA_H

